═══ 1. Smalled Eric's OS/2 editor ═══ SMALLED 1.30 Smalled is a powerfull OS/2 editor. It's fast and has a lot of extra's over the system editor. Smalled is a 32 bit Multi threaded PM application which has all of the attractive OS/2 features like direct manipulation (d&d), presentation parameters, clipboard support , use of extended attributes, ATM font support and WYSIWYG printing. The philosophy behind the programming of smalled is found in a number of articles in the EDM/2 magazine. o Disclaimer Registering/Shareware o The Smalled controls o How do I ..... o What's new / History o Future attractions o Thanks o About the author o About Smalled o Glossary/What is ..... o Other Bianchi software products ═══ 2. Thanks ═══ !Thanks! I've got a lot of people to thank for their help while I was building this Smalled version. It was build in a relative short time and I'm thankfull it's finished (and so are my wife and kids). Thanks to: o First the beta testers who kept me going, especially -Peter Landstreet (Barent) -Paulo Mario dos S. D. de Moraes who in the last days of the 1.30 construction communicated with me on an almost daily basis (Thanks guys) o My wife and kids for having so much patience. o Rich Walsh for sharing the DT rendering method with me. o An increasing number of users who send me their comments. ═══ 3. The Smalled controls ═══ Smalled can be controlled/handled through the normal menu bar, the toolbar or the context-popup. Besides that Smalled will respond to direct manipulation and knows a number of hot keys. o The File menu o The Edit-menu o The Options menu o The toolbar o The context popup menu o Drag-n-drop o Using the keys/mouse ═══ 3.1. The Toolbar ═══ The toolbar is the row of small icons (smarticons) at the top of the window just under the menubar. By using the mouse and clicking once on these buttons, you're able to start the most frequently used functions. In a way the toolbar will act as a menu (in fact it is). The toolbar also provides Bubble-help. Bubble-help can be toggled by doubleclicking mousebutton2 om the toolbar area. The Toolbar can be modified in a number of way's (see the toolbar preferences). The icons in the toolbar have the following functions: By doubleclicking the icon right here in the help file, you'll get more extensive help about the feature attached to the button. -New. -Open -Insert file. -Save. -Save as. -Copy file to -Save-n-exit. -Print. -File info. -Undo. -Cut. -Copy. -Paste. -Clear. -Goto. -Find -Find again. -Replace. -Fonts. -Word wrap. -Text info. -Preferences. ═══ 3.2. The File menu ═══ The file menu contains a number of options which enable you to handle a file from and to disk, or to print it. From the items listed below, the New, Open, Insert file, Save and Print options are included in the toolbar. o New o Open... o Insert file... o Save o Save as... o copy to file... o Print... o File information... o Exit o Save-n-exit ═══ 3.2.1. New ═══ New clears the current document and will fill the titlebar with the filename Untitled.fil. If Untitled.fil is the current filename, save will act as if save-as is invoked. There is an alternative way to open a new file. If open is used with a non-existing filename, a new action is invoked and the name of the new file is set to the name entered. An alternative way to invoke new is through drag-n-drop. If the titlebar icon is dragged to the shredder, Smalled will invoke a new action. If you select New or press the new button , Smalled will first check if the file you're currently editing has changed since load-time or since the last time it was saved. If this is the case, you will be prompted if the current contents of Smalled have to be saved. You can reply with: Cancel: cancels the whole operation. You will return in the current document. No: doesn't save the current file, but it will perform the new operation. Yes: saves the current file and performs the new operation. ═══ 3.2.2. Opening a file ═══ If the Open option is choosen from the file menu or the open button is pressed, Smalled will first check if the file you're currently editing has changed since load-time or since the last time it was saved. If this is the case, you will be prompted if the current contents of Smalled have to be saved. You can reply with: Cancel: cancels the whole operation. You will return in the current document. No: doesn't save the current file, but it start the fileopen dialog. The contents of Smalled aren't distroyed yet, so if you press cancel in the fileopen dialog, smalled returns to the current text. Yes: saves the current file and it will start the fileopen dialog. The fileopen dialog will be opened in the directory set with the set default directory dialog. This can be either a default directory or the directory in which the last opened file resides. If a filename is entered in the file open dialog, that doesn't exist, Smalled will assume that you want to create a new file. It will clear the current contents of smalled and set the filename in the titlebar to the name entered. So if a nonexisting filename is entered, Open functions like New with the ability to set a new filename. If you do this, an alarm will sound and the statusbar will mention what you're doing. An alternative way of opening a file is to use the drag-n-drop capability of OS/2. If a file object is dropped on the Smalled icon, Smalled will be started and the dropped object will be opened. Drag-n-drop can also be used when Smalled is already started. If an object is dropped on the Edit area, the dropped file will be opened. If Smalled already contains text, this drop will have the effect of a Insert file action. The contents of the dropped file will be inserted at the point were the file is dropped (droppoint). Besides getting the file contents into Smalled, there are some values loaded from the extended attributes if the file was previously saved with Smalled. The font, tab, wrap and cursor position settings are loaded from the extended attributes. Smalled can handle large files. However, some operations may become rather slow as files grow very large (>800Kb). However, most of the time this shouldn't be a problem because Smalled is multi-threaded. You may start editing or searching while Smalled is still loading a file. ═══ 3.2.3. Insert file ═══ If Insert file is selected from the File menu or if the Insert file button is pressed, Smalled will start an action which has a large similarity with opening a file. The fileopen dialog will be started using the directory set with the Set default directory dialog and a filename can be entered. If the filename doesn't exist, you will be prompted so. If the file exists, it will be opened and the contents of this file will be inserted at the current cursor position. The name of the file which is currently being edited will be preserved. The font, tab and wrap settings of the Inserted file will NOT be used. The retrieved text will use the settings of the current file. There is however one xeption. If you're retrieving a file while the smalled doesn't contain anything, it will handle a file-insert as a fileopen. An alternative way of retrieving a file is to use the drag-n-drop capability of OS/2. If a file object is dropped on the Edit area, the dropped file will be Insert filed. The file contents will be inserted in the current text at the position of the drop (droppoint). ═══ 3.2.4. File information ═══ The file information option in the file menu gives the possibility to get some more information about the file you're currently editing. This option will only work if the file you're editing is already present on disk. If you're editing a new document, file information won't be available. File information gives info about: - Current filename - Current filesize - Allocated filesize - Creation date (HPFS only) - Last access (HPFS only) - Last write - File attributes Besides that it gives information about three settings saved in the extended attributes. - Used font - Word wrap - Used tabsize ═══ 3.2.5. Save ═══ Saving the Smalled contents can be done by choosing the Save option from the File menu, by pressing the save button ,by using the popup if you have it configured so that it will contain a save option or by use drag-n-drop. There is also a CTRL-S hotkey that will invoke save. Smalled will save the contents, even if they aren't changed since last save or since load-time. When a file is saved, the number of bytes saved to disk are displayed in the statusbar. At the end of the save action the statusbar will display that the file is saved including the total number of bytes saved. Normally this goes very fast. If a file is saved, not only the contents are saved, but also the used font ,the word wrap settings, the tab settings and the current cursor position. These settings are saved in the Extended attributes. This way the files can still be handled as pure ASCII.The drawback is that saving a file on a fat drive may take extra time because the ea's on a fat drive must be saved in a separate file. The name used for saving the file is displayed in the titlebar. If the titlebar contains the name Untitled.fil, Smalled assumes that you're editing a new file and no filename has been entered yet. The standard file dialog will be started so that a valid name may be entered. If the current name isn't the name you want to use for the file, use save as to save the Smalled contents. There is another (rather rude) way to save the Smalled contents. When Smalled is exited, the current contents are checked if they're changed since load-time or since the last save action. If this is the case, you're prompted if the current contents have to be saved. ═══ 3.2.6. Save as ═══ The Save as option of the file menu has as main purpose to save an existing file under a new name. Normally the filename of the contents is diplayed in the titlebar. The name displayed will be used when Save as starts the standard file dialog. After the Save as action, the filename used for the file saved will be changed in the filename used for save as. If you don't want that name to be changed use the copy to file option in the same menu. If a text-selection is active in the edit area, the fileopen dialog will show a checkbox which will enable you to save the selected text to a file. If this option is choosen, the filename for the current text won't be changed. If the filename entered in the save dialog already exists, you're prompted. At that point you can choose to overwrite the existing file or to cancel the save as action. ═══ 3.2.7. copy to file... ═══ The copy to file action enables you to save the file currently being edited under another name (and in another path or drive) without changing the current filename. This way it's easy to make multiple copies of one text-file. If copy to file is enabled, the standard file dialog is started. In the header of that dialog you can see that copy to is started. If a text-selection is active in the edit area, the fileopen dialog will show a checkbox which will enable you to save the selected text to a file. You may use all the facilities of the file open dialog, it won't affect the file you're currently editing. ═══ 3.2.8. Print ═══ By choosing the print option of the File menu or the print button is selected, a print dialog is started. From this dialog you can print the entire text, or a selection if one is active. If a selection has to be printed, check the "print selected text" checkbox. Another attractive way to print the text or a selection is by using drag-n-drop. If this dialog is activated, the default printer will be hilited in the listbox of this dialog. If you've got more printers installed, another printer can be selected by hiliting the printername. (It may be a good idea to install more printerobjects even if you've only got one physical printer. Every printerobject can have a different set of properties. For example, one printer for draft, one for landscape, etc.) The print job properties for the printjob you're about to start can be modified by choosing the setup button. A printer specific setup dialog will appear. This dialog is contained in the printer driver and has its own help. If the print button is hit, the printing will start. The Smalled print routine is multi-threaded. This means you can work while Smalled is printing. The Smalled print routine is a two staged routine. In the first stage, the contents of the edit area are read. During this action a red slider will show the progress made. During this red period, you shouldn't make any changes in the text. Any changes made during this period may show up in the print (depending on whether Smalled has already handled the line you're working on). The next stage in printing is the actual printing. The progress in this action is shown by a yellow slider. During this action every function in Smalled may be performed, it won't disturb the printout. Exiting Smalled at this time will cause the printjob to be discarded without any further notice! The Smalled print facility features WYSIWYG printing. The way things look on screen, they will appear on paper. There is a simple trick to create a print-preview with the OS/2 system. Open the print object you want to print to and activate the object popup. In the popup of a printer there is an option named "Change status". With this option the spooler can be told to hold the printjobs. If this option is flagged, the printjobs aren't sent to the printer, but it will appear in the printer object. To view the contents simply double-click in the job you want to view. OS/2 will start a viewer and you can view the contents of tge print on-screen. (Future versions of Smalled will contain a print-preview option) WYSIWYG printing in Smalled means: The font used in the edit area is the same font as used by the printer. If a font incompatebility occurs, the print routine will try to match the printer font as close as possible to the used screen font. An example: The system font or the vio fonts aren't supported by printers. These are typical screenfonts developed for fast screendisplay. If these fonts are printed OS/2 tries to match them as closely as possible to one of the available fonts. In most cases this will mean that Courier is selected because this is in most cases the only other available non-proportional font. All ATM fonts are supported. The tab size as set in the Smalled is also used in the printed document. This means that the width of the tabs is also used by the print-function By using tabs it's possible to create tables. The tab size as set in the Smalled is also used in the printed document. This means that the width of the tabs is also used by the print-function By using tabs it's possible to create tables. If word wrap is on, the width of the lines printed are set by the size of the main Smalled window! This means that Smalled uses the width of the Smalled main window to set the width of the printed text. So a litteral copy of every textline as you see them on the screen will appear on the printout. Note that in a fullscreen (maximized) Smalled session with word-wrap, the lines always exceed the width of the print-paper! There's no checking if the line width exeeds the printer page width! So if you print very long lines, they are clipped at the side of the page. To prevent this from happening, us the preview described above. ═══ 3.2.9. Exit ═══ Exiting Smalled can be done by double clicking on the system icon, by selecting the exit option of the file menu, by clicking the exit button in the titlebar or by using the F3 button. In all cases Smalled will check if the file contents are changed since the last save action or since load-time. If this is the case, you are prompted if the file has to be saved, if the exit procedure should be canceled or if Smalled should quit without saving the changes. If the current filename is Untitled.fil, selecting Yes from the dialog will start the save as file dialog, so you can enter a valid filename. If a Smalled print session is active, it is discarded as Smalled exits! Smalled will also exit if CTRL-x or ALT-F4 is pressed. ═══ 3.2.10. Save-n-Exit ═══ Save-n-Exit is a shortcut for exiting Smalled and saving the current contents at the same time. This option is available in the File-menu or trough a Toolbar button. ═══ 3.3. The Edit-menu ═══ The Smalled Edit-menu contains the items used to modify (or used in modifying) the contents of the Smalled edit area. The Edit-menu contains the following items: o - Undo o - Cut o - Cut line o - Copy o - Paste o - Clear o - Goto line o - Find o - Find again o - Replace o - Select all o - Deselect all ═══ 3.3.1. Undo ═══ Undo can be activated through the Edit-menu Undo option or by hitting the button. Undo will try to undo (or redo) the last action. Smalled contains a one level undo buffer. This means only the last action can be undone! Since version 0.96 Font changes can also be undone or redone. So a fontchange if it is invoked by a fontdrop or by setting the font through the font dialog can be undone. Because Smalled has a one level undo, changing the font will destroy the contents of the undo buffer. So after a font change a cut, paste or clear action can't be undone! ═══ 3.3.2. Cut ═══ Cut can be activated through the Edit-menu option Cut, by hitting the button or by using the Shift-Del key combination. If there's no text selected, the cut option is not available. Cut is also available trough the popup-menu if there's text selected. If cut is used to move text in Smalled, or between multiple instances of smalled (or EPM), it's more conveniant to use drag-n-drop. Cut deletes the selected text from the edit area and copies it to the Clipboard. The text cut to the clipboard can be retrieved anywhere in the text by using the paste function. When cut is invoked, any previous text contents of the clipboard are destroyed. The Cut operation in Smalled is supported in the main edit area and in several dialogs, in which parts of the text can be selected like in the find, replace and the file-dialog. Use mouse or Shift-arrow to select and cut to the clipboard (Shift-Del). The maximum amount of text you may cut to the clipboard is limited to 64 Kb in Smalled. If you try to cut more then 64 Kb. Smalled will give an error message and discard the cut operation. This is because Smalled is based on the MLE control which has this restriction. In future releases of smalled this restriction may be overcome. This limitation isn't there if drag-n-drop is used when moving text. ═══ 3.3.3. Cut line ═══ Since version 1.20 the cut-line option has been added. This option can also be activated by using the CTRL-Y hotkey. This key-combination is very popular in many editors. It cuts the current line to the clipboard. It doesn't matter if WRAP is turned on or off. ═══ 3.3.4. Copy ═══ Copy can be activated through the Edit-menu option Copy, by hitting the button or the Control-Ins key combination. If there's no text selected, the copy option is not available. If there's text selected, copy is also available from the popup-menu. There's is also anothet way to use copy. You can simply use the very convenient drag-n-drop possibility. Drag the selected text to the point where you want it and simply drop it. Copy copies the selected text to the Clipboard so it can be used somewhere else in a paste operation. The selected text remains unchanged although previous text contents of the clipboard are destroyed. Text can be copied from the main edit area and from several dialogs, in which parts of the text can be selected like in the find, replace and the file-dialog. Use mouse or Shift-arrow to select text and copy it to the clipboard by invoking Control-Ins. In Smalled a copy operation is limited to 64Kb. So if you select more then 64 Kb of text and try to copy it to the clipboard an error message is displayed and the copy action will be discarded! This limitation isn't operartional if text is copied by invoking a drag-n-drop operation. Through Drag-n-drop you can copy any amount of text in a document or between documents. ═══ 3.3.5. Paste ═══ Paste can be activated through the Edit-menu option Paste, by hitting the button or the Shift-Ins key combination. If there's no text in the clipboard, the paste option is not available. If the clipboard contains text, Paste may also be selected from the popup-menu. If cut is used to move text in Smalled, or between multiple instances of smalled (or EPM), it's more conveniant to use drag-n-drop. Paste copies the data from the Clipboard (if there is any) to the current cursor position in the main window . If any text is currently selected, it will be deleted and replaced by the contents of the clipboard. If you want to perform a paste in a dialog window, use Shift-Ins. The amount of text that smalled can paste is limited to 64Kb. If you try to paste more then 64 Kb of text, Smalled will give an error message and the paste operation is discarded. This limitation isn't there when Drag-n-drop is used. ═══ 3.3.6. Clear ═══ Clear can be activated through the Edit-menu option Clear, by hitting the button or the delete key. If there's no text currently selected, the clear option is not available. If there's text selected, Clear may also be invoked from the popup-menu. Besides using the clear button or popup you may also drag the selected text to the shredder. The effect will be the same as deleting the text. Shredded text can also be undone. A clear action deletes the currently selected text. This action can eventually be undone by using Undo. ═══ 3.3.7. Find ═══ The find dialog can be activated by using the Edit menu Find... option, by hitting the button or by using the CTRL-F hotkey. Besides that, Find may also be invoked from the popup-menu, if it is configured that way. The find dialog is a modeless dialog. This means you can open it and still keep on working in the edit area. If the dialog window is clicked, or the replace menu-option or button is clicked, the dialog will become active. In the find dialog a find item can be entered. The maximum length of a find item is 64 characters. If the find button is hit, a search will be conducted through the text. This search can be tailored. Since version 1.00, two checkboxes are added for this purpose. Normally a search will start at the current cursor position and keep searching until the end of the file is reached or the desired item is found. By checking the global checkbox, the search will be conducted from the top of the file. Through the second checkbox, the search can be made case-sensitive. This means that an exact match of the search-item concerning upper- and lower case characters is performed. If this checkbox isn't flagged, the search doesn't make a difference between upper- and lower case characters. If a match is found, it will be hilited (selected). If no matching item is found, a message is displayed. If a find is invoked, Smalled will also set a so-called jumppoint. This enables you to return quickly to the point from where the find was invoked. If an item is found, the find dialog will dissapear. If the entered item has to be searched again, it's possible to invoke the Find option again. Although a simpler aproach is to use the Find again option. It is possible to move the find dialog around. Everytime this dialog is invoked, it will look at the settings you set through Preferences. If the Use last Find-dialog position was checked, the last position will be used to display the dialog. If this setting was not checked, the dialog will be displayed relative to the mouse-pointer. So you can position the dialog in the place you find the most conveniant. Besides the position, the dialog will also remember the last entered search item. ═══ 3.3.8. Find Again ═══ Find again can be activated by using the Edit-menu Find again option or by hitting the button. For the find again action, there are also two hotkeys defined. Find again will also be invoked if F2 or CTRL-a is pressed. Besides that, Find again may also be invoked from the popup-menu, if it is configured that way. This option can only be used if the find action has been invoked at least once. If find has been invoked, the search-text is preserved. Find again will use this search-text. Find again will conduct a non-casesensitive search from the current cursor position until the end off the file or until a matching item is found. If a match is found, it will be hilited (selected). If no match is found, an error message will be displayed. If Find again is invoked, Smalled will reset the jumppoint.This enables you to return quickly to the point from where the last Find (again) was invoked. ═══ 3.3.9. Replace ═══ The replace dialog can be activated by using the Edit-menu Replace... option, by hitting the button or by using the CTRL-R hotkey. Besides that, Replace may also be invoked from the popup-menu if it is configured that way. The replace dialog is a modeless dialog. This means you can open it and still keep on working in the edit area. If the dialog window is clicked, or the replace menu-option or button is clicked, the dialog will become active. In the replace dialog, a target string and a replacement string can be entered. With these strings, several actions can be started. - Next: if an item has already been found and selected, Next will try to find the next match from the cursor on down. If a match has been selected, Next will leave it alone and will try to find the next match. - Replace: if no item has yet been found, the replace action will first locate a possible match and select it. This match isn't replaced yet. If replace is hit again, the selected match will be replaced and Smalled will try to locate the next match from the cursor on down. - All: All will replace all matches from the cursor on down, without prompting the user. - Cancel: cancels the replace action and closes the replace dialog. If no replacement string is entered and the replace action is started, the target string is deleted (when found). The search action the replace dialog conducts, works just like find. (In fact it uses the same code.) Since version 1.00, two checkboxes are added to the replace dialog. If Global is checked, the first search for the target-item will be conducted from the top of the file, if it concernes the replace key and the all key. Next always searches from the cursor position. If global isn't checked, the search always goes from the current cursor position. The replace dialog will remember the place it is dragged to, so the next time replace is invoked, the dialog will check the settings in Preferences. If the Use last Rplace-dialog position is checked, the dialog will open at the last used position, if it isn't checked, the dialog will appear relative to the mouse-pointer. This enables you to put the replace dialog in a spot you find the most conveniant. This position will be remembered through sessions. Besides remembering the dialog window place, the target and replacement strings are also remebered (although not between sessions). Replace also sets a jumppoint. So by invoking CTRL-J, the cursor will jump to the last point the cursor was before the replace. ═══ 3.3.10. Select all ═══ Select all will make a selection of all the text entered in Smalled. Don't use this option if you want to delete all text in a large file. This takes a lot of time because the complete file contents will be transfered into the undo buffer! Better and faster is to use the New option from the File menu. ═══ 3.3.11. Deselect all ═══ Deselect all will undo the current text selection. There are two horkey's assigned to this function, The standard OS/2 Ctrl-\ and (more convenient) the ESC key. ═══ 3.3.12. Goto line ═══ There are several ways to go to a specific line. You may use the Goto Line option of the Edit menu or the CTRL-G hot-key to activate the goto line dialog. Besides that, Goto again may also be invoked from the popup-menu if it is configured that way. This dialog can be handled through use of the keyboard or by using the mouse. You may use the up - and down arrow keys to scroll to all the possible line nr's (it automaticly switches between 1 and the maximum linenr and vice versa). It's also possible to click with the mouse on the arrows displayed with the spinbutton. If a goto is invoked, the jumppoint will be reset to the current line before the jump, so that with a stroke of CTRL-J the cursor returns to the last point before goto was invoked. Another (easy) way to change the current line, is to invoke active vertical scrolling . You can grab the vertical scrollbar with the mouse and drag it. The text will then scroll, meanwhile the linenumber of the topmost line will be displayed in the statusbar. ═══ 3.3.13. Jumppoint ═══ Since version 1.0, Smalled knows a so-called jumppoint. A jumppoint can be used for fast switching between two points in the text. If a file is opened, Smalled will look if it is a file previously saved with Smalled. If this is the case, Smalled will restore the last cursor position. At that moment, the jumppoint is initialized with a 1. If the jumppoint hotkey CTRL-J is pressed, the cursor will jump to line 1 and the corsor position from where the jump took off is saved as the next jumppoint. So if CTRL-J is pressed again, the cursor will return to the place before the jump and the jumppoint is set again to the linenr from where the jump took off. Setting Jumppoints : a jumppoint can be set by invoking a jumppoint. If CTRL-J is pressed, the cursor position from where the jump took off will be the next jumppoint. Find and replace will also set jumppoints. If a find/replace is invoked and the cursor moves to a find match, the place from where the find was invoked is stored as a jumppoint. So pressing CTRL-J will return to the place before the jumppoint. Note that the next jumppoint is the place where find found a match! A jumppoint is also set as goto is invoked. The cursorpoint from where goto took off, is set as jumppoint. ═══ 3.4. The Options menu ═══ The options menu contains items with which the working mode of Smalled can be changed. o Set font o Set color o Tab set o Linebreak o Word wrap o Text info o Use default font o Preferences ═══ 3.4.1. Set font ═══ Setting the current font can be done in a number of ways. You can select the button or select the fonts.. option in the edit-menu. This will start the Standard font dialog. Through this dialog a new font can be appleid as current font or saved as default font. If a font is set, the new font will be displayed in the statusbar. A font change can be undone by using Undo . A more elegant way is to use Drag-n-Drop. By opening the font palette in the system setup folder, you can select a font and drop it on the edit area. Smalled will change the current font to the dropped font. The new font will be displayed in the statusbar. If the file is saved, this font will be remembered when the file is reopened or retrieved. If the font menu is activated, the change flag will be changed. This means that Smalled thinks the file is changed. If you exit Smalled, you will be prompted to save the file even if the contents aren't changed text-wise. If the file is saved, the selected font will be saved in the EA's. So the font will be remembered when the file is reopened or retrieved. ═══ 3.4.2. tab set ═══ If the Tab set option from the options menu is activated, a dialog will be displayed. In this dialog, the new tabsize in mm can be entered. Also visible is the default value for the tab-size. This default value is used if a new document is created or if a file is opened that isn't saved by Smalled, so it doesn't have it's own tab-size stored in the EA's. If Apply is hit, the tabsize in the edit area is set to the entered value. This also happens when Save is hit. Save will also save the entered tab-size as default. The tab setting used in the edit area will also be used while printing. Besides that it will be saved in EA's of the file when the file is saved. ═══ 3.4.3. Linebreak ═══ In version 1.30 the linebreak dialog is introduced. This dialog makes it possible to linewrap a whole document or selected parts in a document. The dialog only displays the selected option if there is any text selected in the Smalled edit-window. besides that if text is selected, this checkbox will be automaticly flagged. So if the whole text has to be handled, decheck this button. If a linebreak action is invoked, Smalled will look at every line in the document or selection and insert a hard return so that the linelength won't exceed the number of characters entered. The hard return character will be entered in the last space or tab char that falls in the boundary of the number of characters. If there is no space or tab character in the line, the hard return is entered exactly at the point where the number of characters is reached. If a linebreak is in progress, the line currently served will be displayed at the statusbar. The Linebreak dialog accepts a minimum linelength of 10 and a maximum of 250. Every number that is outside these limits will be set to the nearest possible value. It is not advisable to let Smalled do a linebreak of 10 on a large document because this may take a considerable amount of time. ═══ 3.4.4. Word wrap ═══ If word wrap is turned on, the lines that exceed the width of the edit area window, will be reflowed to the next line. However, no hard return will be inserted. Word wrap can be used to set the page width for a print job. If word wrap is turned on, the print routine will calculate the line width and use it while printing. This way making the Smalled window smaller or larger will in/decrease the page width. Word wrap is a flagged menu item. When the options menu is opened, you can see immediately if word wrap is on or off. If it's on. a little check mark appears next to the Word wrap option. If word wrap is turned of, no check mark will show. By selecting word wrap from the option menu, you can toggle this setting. The wrap setting can also be toggled by the CTRL-W key combination. The default setting for wrap can be set using the General preferences dialog. The default will be used if a new file is created or a file with no smalled ea's attached is loaded. ═══ 3.4.5. Text info ═══ Text info supplies the user with some information about the text currently loaded. Text info will display the number of characters, the number of lines and the font currently used in the statusbar. ═══ 3.4.6. Preferences ═══ The Smalled preferences are organized in a notbook in which each page handles a certain item. If a change is made in one of the settings displayed in this notebook, these changes will take effect immediatly. The Smalled preferences notebook has the following pages: o General o Toolbar o Popup o d&d o Dialogs o Default dir ═══ 3.4.7. General preferences ═══ The general area contains three area's. In future releases the area's Text and Backups may get their own page Exit button: This creates an X button in the titlebar next to the max-min buttons. This is a very convenient buton, however if you're using utilities like Xit or NPSWPS, this button is unnesecary. Load cursor position: Smalled saves the cursor-position when a document is saved. If this checkbox is flagged, this position is restored when a file is opened. Wrap: Through this checkbox the default value for the Word wrap This value is used when a new document is created. In this document the Wrap behaviour can be changed. Smalled will remember the wrap setting for every file, so this setting won't influence the setting for every single document. Indent The Indent checkbutton is added, but not yet active. Automatic indenting will probably be available in the next release. Backup on fileopen: Through this setting it's possible to let Smalled make a backup of the every file that is opened. The file will loose it's extension and a .bak extension is attached to the file. For this backup mechanism to work a valid directory name has to be entered in the "Backup Dir." entryfield If no name is entered, or an invalid name, no backup is made. If a backup has to be made in the directory the original resides in, simply add a . (dot) in this entryfield. ═══ 3.4.8. Toolbar preferences ═══ Smalled contains a fully configurable toolbar which can be modified in the toolbar preference page. Every change that is made will be effective immediately. This means that if a button is added or removed, the toolbar will instantly change. Listbox: The largest part of this page is filled by a listbox in which all the possible toolbar entries are mentioned. If an entry is selected, the button will appear in the toobar, if it is deselected, it will be removed from the toolbar. The empty spaces between logical groups of buttons are marked as [Empty space] and can also be added or removed. Toolbar: If desired the toolbar can also be turned off. If this chackbox is flagged, the toolbar will be visible, if it is deselected the toolbar will instantly disappear. Bubble help: The Bubble help can be turned of by default. This can also be done by double clicking the right mouse button on the toolbar. ═══ 3.4.9. Popup preferences ═══ Smalled contains a configurable context popup menu. Items: The popup area contains items that can be added to the context popup. The context popup will always contain the cut, clear, copy and paste items. If the dialog is closed with OK, the changes made for the popup will take effect immediately. ═══ 3.4.10. d&d preferences ═══ Smalled contains a full d&d interface which is also fully compatible with Dragtext. It has a minimal set of configurable options. Original filename on save: When a document or a part of a document is saved through d&d, Smalled uses the default filename that the WPS returns. Usually this is "Data File". If this checkbox is flagged, the name in the titlebar is used as the save-name. This only works if there is a valid filename in the titlebar. If it's showing untitled.fil, the WPS default will be used. Use Smalled drag-n-drop: It is possible to partly deactivate Smalled d&d interface. If this button is flagged, the full d&d interace of Smalled will be active. If this isn't checked, the d&d interface for the main edit window is turned of. Drag-n-drop from the titlebar-icon will still work. Use this option if you prefer the DragText utility for handling the d&d for Smalled's main window or if you don't want to use drag-n-drop. Smalled icon on save: This option isn't available yet, but will be in a future release. ═══ 3.4.11. Dialogs preferences ═══ Smalled can also save the last position of the find and replace dialogs. If the checkboxes are on, the find and replace dialogs will appear at the last used position. If the check-boxes are off, the dialogs appear relative to the mouse-pointer. In this case, starting a find or replace dialog from the main-menu, the popup or the toolbar will all result in different positions on the screen. The open and the font dialog. are a different story. If a font or open dialog is dragged, the position will be remembered during the session. If Smalled is closed and opened again, the position of these dialogs will again be the left lower corner of the screen. If the chackboxes for these dialogs are set, the position will be remembered through sessions. ═══ 3.4.12. Set default dir ═══ the set default dir preference page contains a dialog which will enable you to set the default directory for save and open actions. A drive can be selected in the combobox in the upper-left corner. The listbox will show the subdirectories of the current directory of that drive. If a subdirectory is selected by a double-click, this dir is added to the default path displayed above the listbox. If OK is pressed, the directory shown in the top entryfield will be saved as standard directory which will be used in save as and open actions. If the checkbox in Last used directory is flagged, the directory last approached for a file open or file retrieve is used as default dir. So opening a file in a new directory will make this directory default. If this flag is on, the directory set in the dialog has no meaning. ═══ 3.4.13. Use default font ═══ If Use default font is selected, the font set as default font will be retrieved from the OS2.INI file and activated. This font change is confirmed in the statusbar. ═══ 3.4.14. Set color dialog ═══ The set color option in the Options menu will start the change color dialog. In this dialogbox two areas with colored squares are displayed. The left area controls the forground color (text), the right area controls the background color. By single clicking on one of the colored squares, the color of the sample underneath the colored areas will change to the selected color. If Save is clicked, the choosen color combination will be made current in smalled. Besides that the selected color setting will be saved in the OS/2 INI file and become the default color for the next sessions. If Apply is clicked, the selected color setting will be made active for the current session, but it won't be saved as default. The colors used in this color dialog are the 16 standard solid colors (first 16 squares). The other nine colors depend on the setting of the system colors on your machine. If these colors are changed (use scheme palettes), the colors in this dialog as well the edit area may change. The next nine colors in the color dialog map to the following system colors. 1 Window background 2 Active titlebar 3 Desktop 4 Active window border 5 Standard MLE background 6 Standard text color 7 Help background 8 Help highlight 9 Neutral color (Text) You may also change the colors of smalled by dropping colors on the smalled window. Every part of the smalled window (title, statusbar, menu etc.)can be changed using 256 colors. These colors will also be saved as default. The main edit area however accepts only 16 basic solid colors. Besides that dropping a color on the edit area will have the same effect as applying a color (this color won't be saved). ═══ 3.5. The context popup menu ═══ Since version 0.96, Smalled has a context sensitive popup menu. This menu will be activated as the mouse button2 is clicked on the edit area. This popup will contain the most used edit functions, Cut, Paste, Copy and Clear. From these items the popup will show only those items that can be activated. So if text is selected, the popup will at least show the functions Copy, Clear and Cut. If no text is selected, those options won't show. For the paste option the clipboard is checked. If it cantains valid data, the paste options will be displayed. If no popup is showing on a right mouse click, there probably isn't any text selected and the clipboard will be empty. The functionality of the context popup is largely expanded in version 1.00. Since this version a number of actions can be added to the popup. Besides the Copy, Cut, Paste and Clear functions, Open, Save, Save as, copy to, Print, Find, Find again, Replace, Goto and Undo can be added. To set your choice of popup functions, use the Preferences dialog. NOTE: There is a great package to enhance the desktop. It's called NPSWPS (check it out). However since version 1.81 of this package there is an incompatibility with Smalled. Having the NPSWPS Entry Field Menu enabled causes Smalled's context popup to disappear. If you want to use Smalled.s popup instead of NPSWPS's popup, you should disable the Entry File Menu in NPSWPS. This option can be found under the OTHERS tab in the NPSWPS package. ═══ 4. Disclaimer ═══ ====DISCLAIMER==== This package is provided "as is", without any guarantees or warrantees whatsoever. Eric Slaats / Bianchi Software are not liable or responsible for any loss or damage of any kind whatsoever, including, but not limited to, losses of a financial, physical, emotional, marital, social, or mental nature that may result from the use or the purported use of anything in this package, for any purpose whatsoever. This product is supplied "as is", and without any warranties. You may distribute this shareware version of Smalled if the following conditions are met: 1. The distributed archive must contain ONLY the files OS2_2xx.ZIP, WARP.ZIP, SMALLED.HLP, README.SME, FILE_ID.DIZ, ORDER.SME, REGISTER.EXE, REGISTER.HLP 2. The contents of this archive are NOT MODIFIED in any way. 3. This version is not to be sold. However, a reasonable disk copying fee is permitted. ====REGISTERING==== If you like Smalled and want to keep using it after the 40 day trial period, you have to register it. In Smalled's case, this means you've got to buy a registration key. This key will unlock Smalleds Save and print possibilities (which lock up after 40 days). To obtain a registration key you first have to run the register.exe program included in this package. The help in the register program or the readme.sme file will show you how to register your personal key. (See also the ORDER.SME file.) Registering Smalled costs $18. You may register by sending the order.sme form by mail to: BMT Micro PO Box 15016 Wilmington, NC 28408 U.S.A. Bianchi Software Tongelresestraat 61 5613 DB Eindhoven The Netherlands Ordering by fax or E-mail (credit card) can only be done by BMT Micro. Enjoy and SUPPORT SHARE/FREEWARE! ═══ 5. About the author ═══ If you feel the need to contact me, send your comments, criticism, wishes, bugs and postcards (keep 'em commin' :) ) to: E. Slaats Tongelresestraat 61 5613 DB Eindhoven The Netherlands EMAIL Eric.Slaats@pi.net EMAIL E.Slaats@fe.hse.nl ═══ 6. About Smalled ═══ Smalled is a 32 bit multi-threaded PM applet that is written in Borland C++ 2.0. A must in the development of Smalled was to try to incorporate all the goodies OS/2 has to offer. Smalled features: o Toolbar with Bubble-help o Statusbar o Complete Drag-n-Drop support o Clipboard support o INI Support (Saving size, place, Etc.) o EA's (Saving fonts, wrap, tab-size) o WYSIWYG Printing o Multi-threading o ATM support o Context popup Just like Confed, Smalled was created out of a need to learn C++ programming under OS/2 PM. Initialy Smalled was a spinoff from this process, but it has evolved beyond that. This program is the result of the user reactions I've got on earlier (free) versions of Smalled and on the articles written in EDM/2. A lot of people have asked for features and encouraged me to expand this program. It has taken so much out of my spare-time (and other resources) that I've decided to make it (cheap) shareware so some of my expenses may become covered. Most of the programming ins and outs are published in EDM/2. Three articles about buidling an editor version 3-4, 3-6 and 3-9. One article in simple buttonbars (EDM/2 issue 3-8) and bubble-help (issue 3-10). Where building Confed learned me the basics, Smalled learned me how to handle EA's, multi-threaded printing, drag-n-drop and device contexts. Real helpfull were: o Code examples o The DEVCON CD's o EDM/2 magazine (GET IT!) o The HOBBES CD's o (BOOK) The art of OS/2 2.11 C programming o (BOOK) Real world programming for OS/2 o (BOOK) OS/2 presentation manager programming ═══ 7. What's new / History ═══ Thanks for all the mail, Please keep the comments comming especially if you discover a bug or want something changed. This Version 1.20 has a lot to thank the Beta testers for. A lot of the improvements were changed according to their suggestions. I'm very pleased with the full drag-n-drop interface and I think it should make some people happy ;) New/changed in Smalled version 1.30 5 May 1996 o NEW Full support for the Dragtext utility o NEW Toolbar is fully configurable o NEW Preferences notebook with new options o NEW Basic backup utility o NEW Linebreak dialog o NEW Expanded the popup o NEW Save and exit o NEW Deselect (esc Ctrl-\) o NEW Added some new hotkeys o Changed Ctrl-A == Save as o Changed Insert file for Retrieve (Ctrl-I) o Changed Ctrl-C == Copy file to. o Improved Flow in save on exit o Improved Multithreading (semaphores) o Improved d:d (preference switches) o Improved Error handling o Fixed Blackline under toolbar icons o Fixed d:d bug with copy/move o Fixed Bug in handling broken ea's History Smalled 1.21 9 April 96 o NEW Full drag-n-drop interface for selected and complete text Added are. Move, Copy, Print, Shred, Save o NEW File history in file-dialog o NEW Save selected. o NEW Print selected. o NEW Days left in about dialog. o NEW 40 day lockup only for save. o NEW CTRL-Y = Cut line. o NEW Save as in toolbar. o NEW Drop inserts at drop point o NEW Print and Copy to ... in Popup menu. o Changed CTRL-A to Save as o Improved exe size for warp (70 Kb) o Improved multi-threading. o Improved Print-memory-management. o Minor bugfix in loading files Smalled 1.10 25 Jan 96 o NEW copy to file... o NEW File Changed flag in Statusline o NEW Nr of lines in Statusline o NEW File attribs in File info dialog o NEW Tab size in File info dialog o NEW Optional load cursorpos o NEW Optional replace-dialog position o NEW Optional Find-dialog position o NEW Dragtext support o Improved Search in opendialog o 30 day lockup only for save and print o Fixed black bubbles in 2.1 Smalled 1.00 1 Jan 96 o NEW Jumppoints (CTRL-J) o NEW preferences dialog o NEW Popup configurable o NEW Find updated (global and case sens e.o.) o NEW Replace updated (global and case sens e.o.) o NEW Position save for find and replace o NEW Search function in open dialog o NEW Buttonbar optional o NEW Buttonbar status save (including bubble) o NEW Save bubble status o NEW default setting for tabs remembered o NEW CTRL-P for print o NEW CTRL-N for new o NEW Possible to save empty files o NEW Possible to save unchanged files o NEW Fileopen with nonexisting filename sets filename o Improved font handling (dialog) o Improved FileOpen dialog o Improved Default dir dialog o Improved Bubble-help display o Improved All dialogs got Mnemonics control o Improved memory error message o Improved Flow open dialog o Improved fontsize set doesn't destroy tabsize o Bug fix default select standard printer o Bug fix Fixed alt-backspace o Bug fix not display opendlg if default dir is root Smalled 0.96 October 95 o New Exit button in titlebar o New context sensitive popup menu o New Bubble-help o New Undo works for font change o Improved flow in conditional save o Improved memory managent in print o Improved error handling clipboard failures o Smaller code o Change F3 function key to exit o F2 function key for search again o Ctrl +/ added for select all o Bug fix (hanged applet) in Cancel in save on exit o Bug fix in opendialog failure because of no start entries in the INI Smalled 0.95 September 95 o New go line dialog o New color change dialog o New active vertical scrolling o New Tab size saved in EA o New Save as dialog on exit if untitled.fil o Bugfix fileopen/filesave with long names o Bugfix Protection against EA screwups o Bugfix in drop color o Changed default dir save (last recently used) o Changed fileinfodlg o Changed default dir dialog (remember last dir) o Changed Retrieve function o Error message on clipboard failure o Ctrl+O Open o Open Icon added Smalled 0.9 August 95 o New Set default dir dialog o Bug fixed unable to open situations o Bug fix in set defaults o Bug fix in save on exit o Bug fix in Print o CTRL-F = find o CTRL-A = find again o CTRL-R = replace o Set defaults gives statusbar message o Wrap will be saved as default. o Wrap change gives statusbar message o Change flag on font change o Saves cursor position with each file o Modeles find/replace dialogs. o Improved EA's. access o Shortcut keys in menu's o Info in the options hotkey to I but T o New in buttonbar o Limitations of smalled added in Help file Smalled 0.8 Juli 95 Initial release ═══ 8. Future attractions ═══ o (real time) Line-wrap o Extended backup function o Visual improvement o automatic indenting o Printer preferences (pagenr, etc.) o Printer preview o Optional page break display o Optional ruler o Keyboard Macro's o Keyboard remapping o Easy access to рстуф, etc. o Correct spelling-errors in this help o Find, replace for o Multi file edit (spawn) o Append to clipboard o Multi level undo o Extensions for writing INF and HTML (separate program is comming) o Support for comment, history and keyword EA's o secondary font (fast switching) ═══ 9. Freeware/shareware from the same author ═══ SMEHTM Soon to be released is SMEHTM. This is not directly an editor but a program that can invoke Smalled or E.EXE and use them as editor environment for dedicated HTML editing. It's a small notebook that floats on-top and that can be used to insert HTML tags into the text that is being edited in Smalled or E. It supports a very large set of the HTML code set. Besides that, versions for INF and JAVA are being prepared. All registered users will be notified if this applet is released. Here are some screenshots to give an impression. Confed Confed, currently in version 0.8, is a config.sys editor. On the outside it has the same look and feel of Smalled. This application makes editing/creating the config.sys real easy. It features custom edit controls for the config commands, on-line help for the config.sys, and most of the features of Smalled like Multithreading, direct manipulation, button-bar, etc. Check it out. Confedxx.zip can be found on several OS/2 sites like ftp.cdrom.com and Hobbes. ═══ 10. EDM/2 ═══ is a publication by developers for developers and is published by IQPac Inc. EDM/2 is largely the work of three people. Editor-in-chief Larry Salomon Jr., Associate editor Carsten Whimster and Contributing editor Gordon Zeglinski. Besides the columns these three add there are articles written by independent authors. EDM/2 is out there for three years now and is a very high standard publication. For me it was one of the most used sources for example code and explanations while building Smalled and the other OS/2 projects I do. If you're working on a OS/2 project now or if you're interested how Smalled was done, check out EDM/2, you won't be disappointed! EDM/2 can be obtained in any of the following ways: o Ftp on the Internet - hobbes.nmsu.edu/os2/newsltr - ftp.luth.se/pub/os2/programming/newsletter - generalhq.pc.cc.cmu.edu/pub/newsletters/edm2 o WWW readable on-line on the internet - fttp://www.iqpac.com o The EDM/2 mailing list. Send an empty message to edm2-info@knex.mind.org to receive a file containing (among other things) instructions for subscribing to EDM/2. o On Compuserve all back issues are available in the OS/2 Developers Forum 2. ═══ 11. How do I ..... ═══ Get help fast Use multiple Smalled instances Use Drag-n-Drop in Smalled Open a file Save a file Use the file-history Cut text Copy text Paste text Change a font Change colors Save a font Set preferences Find a word Replace a word Delete text Print a document Change word wrap Change tab settings Active vertical scroll Goto line Find a file ═══ 11.1. Open a file ═══ Opening a file can be done in three different ways. - Using file-menu open (with the filehistory) - Dropping a file object on the Smalled icon - Dropping a file object on the Smalled edit area. ═══ 11.2. Save a font ═══ The font selected by a document will be saved in the Extended attributes of a file, as this file is saved. The default font (font used when a new file is created or a file without smalled ea's is opened) can be set if the Save button is invoked on the Font-Dialog. This dialog is started if the set-font option is choosen from the options-menu or from the button-bar. ═══ 11.3. Find a word ═══ Use the find button or select Find from the Edit-menu. ═══ 11.4. Replace a word ═══ Use the replace button or select replace from the Edit-menu and fill in the dialog. ═══ 11.5. Delete text ═══ Select text and use del or the button or select Clear from the Edit-menu. ═══ 11.6. Print the document ═══ Printing the current document can be done by selecting the Print option of the File menu or by selecting the print button . If a selection has to be printed the "print selected" checkbutton must be flagged. Another way is to drag the titlebar icon to the printer if the whole text has to be printed. If a selection has to be printed the selection can be dragged to the printer. ═══ 11.7. File history ═══ The file-history in Smalled is attached to the Standard file dialog This way it can be used not only for opening a file but also for insert file, save as and copy to. The file-history is attached to a drop-down list that is attached to the file-name entry-field, This list can be operated in the same way a drive can be selected. The cursor-down may be used to circle through the entries or the button on the right of the entry-field can be invoked to show the entire list. ═══ 12. Glossary / What is ... ═══ The following (technical) terms which may need further explanation are used in this help document. o OS/2 o Clipboard o Presentation parameters o Drag-n-drop o Multithreading o Direct manipulation o ATM fonts o Extended attributes o Standard file dialog o Standard font dialog o File-history o Bubble-help o Drag Text o Linebreak ═══ 12.1. Multithreading ═══ Multithreading is the capability of OS/2 to perform more than one task at once for one proces. For example you can access the help of this applet, and in the meantime load, save or print a file. Both actions are taking place at the same time . It's like walking and chewing gum at the same time. It's NOT like Windows, which takes a step, performs a chew, takes a step, etc. ═══ 12.2. IBM OS/2 ═══ OS/2 is a registered trademark of International Business Machines. It's the wonderfull operating system you are using at the moment. ═══ 12.3. Presentation parameters ═══ Presentation Parameters are a set of properties which are attached to every OS/2 control. These properties command the way a control looks. The most common use is changing fonts and colors by dropping them on a control using Direct manipulation. If you want to change fonts or colors, you first have to open a font-palette, color-palette or scheme-palette from the system setup folder. ═══ 12.4. Clipboard ═══ The clipboard provides a temporary storage area for a piece of text, a bitmap or a metafile. In Smalled the only interresting part is text. It will enable you to move data within Smalled or share data with other applications. The most common operations on the clipboard are: Cut Copy Paste The data in the clipboard is maintained in memory only. Clipboard data is lost when the computer is turned off. ═══ 12.5. Direct manipulation. ═══ One of the most attractive features of the OS/2 desktop is the possibility to drag objects and drop them on another object and thus start an action involving those two objects. This is called direct manipulation. In Smalled direct manipulation is completely supported. Smalled even understands the Drag-text rendering method. Besides that it's behaviour can be customized (see d&d preferences).If Smalled is on the drag-site, selected text can be dragged by starting a drag from anywhere on the edit-area as long as there is a block of selected text. If the whole text has to be dragged, the drag must be started from the title-bar icon. The following actions can be invoked in Smalled by using Drag-n-drop: o Opening a file o Saving a file o Saving selected text o Copy and move of text o Shredding text / invoking new o Printing o Changing Presentation parameters o Working with Drag-text A drag can be aborted by using the ESC key or the F1 (help) key. If F1 is invoked, this help-page will be displayed. WARNING: The use of drag-n-drop can randomly distort bitmaps and icons on your system. This isn't a Smalled bug, it's a bug in OS/2 and it isn't fatal because everything will work just fine. However it's very anoying. IBM fixed this bug in Fixpack 8. So if you're experiencing trouble of this kind, just install fixpack 8 or higher. ═══ 12.6. Drag Text. ═══ DragText is a utility written by Rich Walsh. This utility makes it possible to use d&d from virtualy every OS/2 control. Besides that DragText has a lot of extra's and it is an extremely well behaving utility. Smalled understands the rendering method used by DragText, so if DragText is installed it can be used seamlessly with Smalled. Drags are possible from Smalled to DragText supported applications and vice versa. Besides being able to drag text to every possible entryfield, DT also supports drags from *every* OS/2 window. Besides that DT has the following extra's : o drop text on a WPS folder to create a file whose name is based on the first few words of the text. You can drop one of these DragText files on any supported window to insert the text. o if the text you drop on the WPS is a URL, DragText will create a WebExplorer Url object. The object's title will be taken from the URL, minus unnecessary words like "http://", "www", etc. o press Alt as you drop any file on a multiline entryfield to insert its contents. o press Alt as you drop a folder on a multiline entryfield to insert a formatted listing of the directory's files. You can configure the formatting any way you want; you can even use it to write cmd files. o because DT can create files, you can drop text on many programs that won't accept dragged text but will accept a file. o since DT now does so many things, it uses 6 different icons to show you what will happen when you drop your text. You *must* have Fixpack 8 or later installed; if you don't, this feature will be disabled to prevent your system from crashing. ═══ 12.7. Opening a file through drag-n-drop ═══ A file can be opened through drag-n-drop in several ways. - If a file object is dropped on the Smalled icon, Smalled is started and the file-object dropped on the Smalled icon is opened. - A file object can be dropped on the Smalled edit area when Smalled is already open. If Smalled doesn't contain text, the file is simply opened. If Smalled contains text, the text of the dropped object will be inserted at the point it is dropped. The complete dropped text will be selected after the drop. ═══ 12.8. Saving a file through drag-n-drop ═══ Saving text through drag-n-drop is one of the nicest features of Smalled. Saving can simply be achieved by dragging the titlebar-icon or a text selection to the place where you want the text to be saved. the WPS will create a data-file at the drop point containing the complete text currently in Smalled or in the selection. In the preferences dialog, you can set the way Smalled will set the filename. The possibilities are: The original filename (the one that's in the titlebar) is used for the save action or the system default [data file] is used. You don't have to worry about duplicates or overwriting a file, the filesystem simply numberes the file if it has the same name as an already existing file. Future releases may have a dialog for customizing the drop-name. ═══ 12.9. Saving selected text through drag-n-drop ═══ If the selected text has to be saved, simply start a drag operation from anywhere on the edit area as long as a selection is active. You may drag the selection to any place you like. The selection will be saved as data-file on the place you drop it. In the preferences dialog, you can set the way Smalled will set the filename. The possibilities are: The original filename (the one that's in the titlebar) is used for the save action or the system default [data file] is used. You don't have to worry about duplicates or overwriting a file, the filesystem simply numberes the file if it has the same name as an already existing file. ═══ 12.10. Copy and Move text through drag-n-drop ═══ Copying and moving text through drag and drop is supported in one instance of Smalled or between instances of Smalled (or to EPM) and to all Drag-text supported controls. A drag can be started from anywhere in the edit area as long as a selection is active. The dragged text will be inserted at the drop point. If the SHIFT key is pressed during the drag, a move is assumed. If this is the case, the dragged selection will be deleted after the drop. After the drop, the complete text will be selected. If a drag has to be discarded, ESC will do the trick. ═══ 12.11. Shredding text / invoking new through drag-n-drop ═══ Shredding (deleting) text is the same as invoking a clear on the selected text with the difference that the selected text is dropped on the shredder. After a shred operation, the deleted text can be retrieved by invoking an undo. It's also possible to delete the whole text. In this case the titlebar-icon must be dragged to the shredder. If this is done, Smalled will act just as if a New operation is invoked. ═══ 12.12. Printing through drag-n-drop ═══ To print the complete contents of Smalled, the titlebar-icon has to be dragged to the printer. If this is done, a normal print operation is started. In this print action the dropped on printer is used. In Smalled it's also possible to print a selection. Simply start a drag from anywhere on the edit area (as long as a selection is active) and drop this selection on the printer. The currently selected text will be printed using the font, tab, etc. currently in use for that text in Smalled. If a drag operation has to be discarded, use ESC. ═══ 12.13. Changing Presentation parameters through drag-n-drop ═══ You can change the color of any part of the Smalled main window (except the smart icons) by dropping a color on it. To do this, open the system setup folder and start the color palette. Choose a color and drop it on the part of your choice For example one of the scrollbars. They will change color. If you exit the application, the change will be remembered. In a simmilar way, the Fonts can be changed. Start the font palette and pick a font. Drop it on the menubar or on the edit area. The font will change. Changes will be saved. You can change both color and font in a single action by dropping a scheme palette on Smalled. The scheme palette is also found in the system setup folder. ═══ 12.14. Working with Drag-text ═══ Many people use Rich Walsh's Drag-text package. This nice package can be used with Smalled. Smalled understands the rendering methods used by DragText. This means that Smalled can be used directly with no further changes with DT. You may drag objects from DT supported controls of drag to DT supported controls. Smalled can even be modified so that DT takes control over the d&d in the Smalled edit window (see d&d preferences). ═══ 12.15. ATM fonts ═══ The most fonts OS/2 uses are Adobe Type Manager fonts. These fonts are scalable in all directions and are supported by Smalled. There are a lot of ATM fonts that are freeware. They can be installed in OS/2. All the ATM fonts installed in OS/2 can be used in Smalled. ═══ 12.16. Extended attributes ═══ In DOS and Windows, files only have 4 attributes (actually it's 6). Files can be hidden, Read only, System or archived. OS/2 however can attach more information (attributes) to a file. This information is known as the extended attributes. They can have a maximum size of 64Kb for each file! The creation date and the last access date are examples of extended attributes. More extended attributes can be found in the settings notebook of a file. Most common are: - History - Comment - Keywords - Icon - long name Besides these standard extended attributes OS/2 has the ability to use custom EA's. Smalled uses four custom EA's to store the used font, the wrap setting, the tab-size and the last used cursor position. The beauty of this approach is that the file contents are pure ASCII and can be handled as such by every other application. Future releases of Smalled will probably see more EA access. ═══ 12.17. Standard file dialog ═══ The Standard file dialog is the standard dialog OS/2 provides for disk access actions. It enables you to change directories and drives and select a filename from a listbox. The entered filename will be used to open, save, save as, copy to or insert-files. The file-dialog will look like the picture underneath if you've got fixpack 17 installed. Hint: Use the Set default dir in the file menu to set the directory used by the open, save as, insert file and copy to actions. The open dialog used in Smalled has some nice extra's. It has two major extra's. It contains a file history and a file find utility. The file entry field contains a drop down list with the 8 last used files. Even that are opened or saved through drag and drop are added to the list. The list can be activated by using the small button on the right site of the entryfield (just like the drive list), or the cursor keys can be used to walk through the entries one by one. It is also modified so it can be used to find a file anywhere on the system. If you change the contents of the 'Open filename:' entryfield, the Search button will become available. If search is pressed, Smalled will search the drive mentioned in the 'Drive:' field for the file entered. The search will be conducted recursively from the directory active in 'Directory'. So if the d:\files\smalled directory is current in the open-dialog. All directories under this directory will be searched. The filename entered may contain the wildcards * and ?. The Smalled open dialog also supports other ways of finding a file (since version 1.10). You may also enter a complete path with wildcards. If a complete filepath is entered and a search is conducted, all the subdirectories of the path entered are searched for the file mask. If you only want to search the entered directory, simply press return after entering the filemask (! Not the search button) and the File: listbox will show all the files in the entered directory. If a filemask with only the driveletter is entered, the whole drive is searched from the root. If the search is started, the 'File:' listbox will change to 'Found:'. The files that match the query will be displayed in that listbox. If one is selected it will be displayed in the 'Open filename:' entryfield. If OK is pressed, this file will be opened. If Cancel is pressed, the search will be aborted and the found listbox will dissapear. There is a quicker way to open a found file. Just double-click on one of the found names and Smalled will open it. If the search is conducted in a drive/directory combination isn't of your liking, just change them and press search again. The search currently underway will be aborted and a new search will be started. If no matching files were found, a message stating so will be displayed in the 'Found:' listbox. ═══ 12.18. Standard font dialog ═══ The standard font dialog is provided by OS/2 for a consistant way of selecting fonts. It enables you to select a font, select its attributes and style and set its point-size. An example of the selected font will be shown in the dialog. Smalled uses a slightly modified version of thsi dialog to make a difference between saving a font as default and applying one. If the save buton is pressed, the font of the text currently loaded is changed and the font is saved as the default. If apply is pressed, the font used in the text loaded is changed. This font is saved with the file in the ea's as the file is saved. ═══ 13. Limitations of Smalled ═══ This help entry is added in version 0.9. It is added to point out to users what can and can't be done with Smalled. With the release of Smalled 0.95 some of these items have become possible. Most noticeble active scrolling and color changing. Smalled is based on the MLE control found in OS/2. As such it can be seen as a shell which makes it possible to acces this control easily. The MLE control (Multi Line Edit) can be found in more places in OS/2, for example in the third page of the file tag of the settings notebook. In this page comments etc. can be added. The control used to do this is the MLE control. MLE was intended to edit small pieces of text, typically 4kb. I found it was able to handle very large amounts of text (several MB's), although performance may suffer as if you try this. If you use Smalled you have to live with the limitations of the MLE control until I find time to write my own MLE control which (of course) won't suffer from these limitations, or until I find a work around. The following items limit the use of smalled. Load and save performance 64Kb clipboard support If you have any comments beside these items please let me know. ═══ 13.1. Load and save performance ═══ In smalled loading (large) files is slow while saving the files is fast. How come? The MLE control was intended to handle small amounts of text. It was never designed to be a full sized editor. So this control is limited to 64Kb of text. Smalled is capable to handle larger files because there is a way around this, load and save the files in chunks of 64 Kb. When saving a file, the MLE control releases the 64 Kb chunks very fast so saving is fast. It seems even faster because it's handled multi threaded. Loading a (large) file is slow because MLE has to prepare a 64 Kb chunk of memory before loading 64 Kb of text. When it does this MLE displayes the clock pointer. With Every consecutive 64 Kb block that has to be prepared the prepare time grows. This makes loading slow and nothing can be done to speed it up (Until I write my own MLE control). If you're using files up to +- 300 Kb you shouldn't even notice this. Files of 1 Mb and larger suffer greatly from this slowing down. ═══ 13.2. 64Kb clipboard support ═══ The MLE control also handles clipboard support. With one message the selected text is copied to the clipboard. This has one limitation, the maximum amount of text that the MLE can copy to the clipboard is 64Kb. This is because the MLE control is limited to handling 64 Kb of text. I haven't found a way around this. You will be noticed if you try to cut, copy or paste more then 64 Kb. ═══ 14. Keys help ═══ As with all good applications there are some `hot keys` defined which will make life a little easier. Also a few mouse actions are defined as shortcuts. ┌────────────────┬──────────────────────────────┐ │Key │Action │ ├────────────────┼──────────────────────────────┤ │Shift-Del │Cut selection │ ├────────────────┼──────────────────────────────┤ │Ctrl-Y │Cut current line │ ├────────────────┼──────────────────────────────┤ │Ctrl-Ins │Copy selection │ ├────────────────┼──────────────────────────────┤ │Shift-Ins │Paste │ ├────────────────┼──────────────────────────────┤ │Alt-Bksp │Undo │ ├────────────────┼──────────────────────────────┤ │Shift-arrow │Select text or extend a │ │ │selection in the direction of │ │ │the arrow │ ├────────────────┼──────────────────────────────┤ │Shift-Home │Select text or extend a │ │ │selection to the beginning of │ │ │the current line │ ├────────────────┼──────────────────────────────┤ │Shift-End │Select text or extend a │ │ │selection to the end of the │ │ │current line │ ├────────────────┼──────────────────────────────┤ │Shift-Ctrl-Right│Select text or extend a │ │ │selection to the beginning of │ │ │the next word │ ├────────────────┼──────────────────────────────┤ │Shift+Ctrl+Left │Select text or extend a │ │ │selection to the beginning of │ │ │the previous word │ ├────────────────┼──────────────────────────────┤ │Shift+Ctrl+Home │Select text or extend a │ │ │selection to the beginning of │ │ │the file │ ├────────────────┼──────────────────────────────┤ │Shift+Ctrl+End │Select text or extend a │ │ │selection to the end of the │ │ │file │ ├────────────────┼──────────────────────────────┤ │ESC │Deselect or Cancel a drag │ │ │operation │ ├────────────────┼──────────────────────────────┤ │CTRL-n │New │ ├────────────────┼──────────────────────────────┤ │CTRL-o │Open │ ├────────────────┼──────────────────────────────┤ │CTRL-i │Insert file │ ├────────────────┼──────────────────────────────┤ │CTRL-c │Copy to file... │ ├────────────────┼──────────────────────────────┤ │CTRL-s │Save │ ├────────────────┼──────────────────────────────┤ │CTRL-a │Save as ... │ ├────────────────┼──────────────────────────────┤ │CTRL-p │Print │ ├────────────────┼──────────────────────────────┤ │CTRL-x │Exit │ ├────────────────┼──────────────────────────────┤ │ALT-F4 │Exit │ ├────────────────┼──────────────────────────────┤ │F3 │Exit │ ├────────────────┼──────────────────────────────┤ │CTRL-w │Toggle Word wrap │ ├────────────────┼──────────────────────────────┤ │CTRL-f │Find │ ├────────────────┼──────────────────────────────┤ │F2 │Find again │ ├────────────────┼──────────────────────────────┤ │CTRL-r │Replace │ ├────────────────┼──────────────────────────────┤ │CTRL-j │Jumppoint │ ├────────────────┼──────────────────────────────┤ │CTRL-/ │Select all │ ├────────────────┼──────────────────────────────┤ │CTRL-\ │Deselect all │ ├────────────────┼──────────────────────────────┤ │CTRL-+ │Select all │ ├────────────────┼──────────────────────────────┤ │CTRL-HOME │Goto top of document. │ ├────────────────┼──────────────────────────────┤ │CTRL-END │Goto end of document. │ ├────────────────┼──────────────────────────────┤ │Tab │Insert a tab character at the │ │ │cursor position │ ├────────────────┼──────────────────────────────┤ │Del │Clear │ ├────────────────┼──────────────────────────────┤ │Insert │Switch between insert and │ │ │replace mode. In insert mode, │ │ │new text is inserted at the │ │ │cursor position, moving the │ │ │existing text to the right. In│ │ │replace mode, the new text │ │ │replaces the existing text. │ ├────────────────┼──────────────────────────────┤ │Mouse │ │ ├────────────────┼──────────────────────────────┤ │Dblclk1 │Select word under the cursor │ ├────────────────┼──────────────────────────────┤ │Snglclk1-drag │Select area │ ├────────────────┼──────────────────────────────┤ │Snglclk2 on edit│Activate popup menu │ │area │ │ ├────────────────┼──────────────────────────────┤ │Dbllclk2 on │Activate Bubble-help │ │Toolbar │ │ └────────────────┴──────────────────────────────┘ ═══ 15. Getting help fast ═══ Smalled is designed with virtually all the OS/2 possiblities on board. So it is possible to jump to a particular help page fast. Help for the toolbar buttons can be obtained by pressing the button and holding the mousekey down. If F1 is pressed while the mousebutton is held down, the help page for the particular button action is displayed. Another quick way to obtain help for buttons is to turn on Bubblehelp. Help for menu items can be obtained in the same fashion. Just hold down the mousekey on a selected menu or menuitem and press the F1 key. Help dialogs can be obtained by the help buttons displayed on the dialogs or by pressing F1. ═══ 16. Multiple Smalled instances ═══ You may start Smalled more then once. You can even use Direct manipulation between the Smalled instances. The easiest way to start multiple instances is to create a new program objact anywhere you like from the templates folder and set Smalled.exe as the file to be executed. The next step is setting the "Object open behaviour" in the window tab. If this is set to "Create new window", a new instance of Smalled is started each time the smalled program icon is clicked. ═══ 17. Bubble-help ═══ In version 0.96 bubble help is included. When bubble-help is activated, a small window appears under a toolbar button when you mouse over it. This window contains a short discription concerning the function of the button currently under the mouse pointer. This function is considered usefull for first time users. In the long run these bubbles tend to irritate. So the default for bubble-help is off! To activate bubble-help doubleclick the mousebutton2 on the toolbar. If bubblehelp is turned on it will be mentioned in the statusbar. To turn bubblehelp off doubleclick again on the toolbar.